package com.imooc.study.imoocstudy.common;

import org.apache.ibatis.mapping.MappedStatement;
import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;

public class TestCommonMapperProvider extends MapperTemplate {

    public TestCommonMapperProvider(Class<?> mapperClass, MapperHelper mapperHelper) {
        super(mapperClass, mapperHelper);
    }

    // Caused by: tk.mybatis.mapper.MapperException: com.imooc.study.imoocstudy.common.TestCommonMapperProvider中缺少selectTestGet方法!
    // 因为没有加参数(MappedStatement ms)，参数为必须加的。
    public String selectTestGet(MappedStatement ms){

        StringBuilder sql = new StringBuilder();
        sql.append("select * from user");

        return sql.toString();
    }

}
